package com.leap.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Builder
@TableName("history")
@Schema(description = "浏览历史类")
public class History {

    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(description = "用户Id")
    private Long accountId;

    @Schema(description = "文章Id")
    private Long articleId;

    @Schema(description = "浏览时间")
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE )
    private LocalDateTime updateTime;
}
